home *** CD-ROM | disk | FTP | other *** search
File List | 1991-08-11 | 3.2 KB | 127 lines |
-
- Motorola DSP56000 Macro Cross Assembler Version 2.02 91-08-11 13:24:20 data.asm Page 1
-
-
-
- 1 page 132,63,1,1
- 2 opt rc
- 4
- 5 ;***************************************************************
- 6 ;* DATA.ASM -- Necessary coefficients for FFT calculation *
- 7 ;* *
- 8 ;* Copyright (C) 1991 by Alef Null. All rights reserved. *
- 9 ;* Author(s): Jarkko Vuori, OH2LNS *
- 10 ;* Modification(s): *
- 11 ;***************************************************************
- 12
- 13 section FFTData
- 14 xdef coef,data
- 15 xdef samples,window
- 16 xdef acca,accb
- 17
- 18 00000400 points equ 1024
- 19 3.141593 pi equ 3.141592654
- 20 0.006136 freq equ 2.0*pi/@cvf(points)
- 21
- 22
- 23 X:0000 org x:
- 24
- 25 ; SIN coefficients
- 26 coef
- 27 00000000 count set 0
- 28 dup points/2
- 29 m dc -@cos(@cvf(count)*freq)
- 30 m count set count+1
- 31 m endm
- 1056
- 1057 ; FFT data
- 1058 X:0200 000000 data ds points
- 1059
- 1060
- 1061 Y:0000 org y:
- 1062
- 1063 ; COS coefficients
- 1064 00000000 count set 0
- 1065 dup points/2
- 1066 m dc -@sin(@cvf(count)*freq)
- 1067 m count set count+1
- 1068 m endm
- 2093
- 2094 ; FFT data
- 2095 Y:0200 000000 ds points
- 2096
- 2097
- 2098 P:0000 org p:
- 2099
- 2100 ; input sample buffer
- 2101 P:0000 000000 samples ds points
- 2102
- 2103 ; transform window (Hamming)
- 2104 window
- 2105 00000000 count set 0
- 2106 dup points
-
-
- Motorola DSP56000 Macro Cross Assembler Version 2.02 91-08-11 13:24:20 data.asm Page 2
- FFT data areas
-
-
- 2107 m dc @pow(2,-6)*(0.54-0.46*@cos(2.0*pi*@cvf(count)/@cvf(points)))
- 2108 m count set count+1
- 2109 m endm
- 4158
- 4159 ; two result accumulators
- 4160 P:0800 000000 acca ds points/2
- 4161 P:0A00 000000 accb ds points/2
- 4162
- 4163 endsec
- 4164
- 4165 end
- 0 Errors
- 0 Warnings
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-